import Router from '@koa/router';
import Static from 'koa-static';

import postRouter from './post';
import userRouter from './user/interface';

import env from '../env';

const router = new Router();

router.use('/api/post', postRouter.routes(), postRouter.allowedMethods());
router.use('/api/user', userRouter.routes(), userRouter.allowedMethods());

router.all('/(.*)', Static(env.SERVER.STATIC_PATH));

export default router;
